package com.morgan.storageperlib.saf

import android.content.Intent
import android.net.Uri
import androidx.activity.result.ActivityResult
import androidx.activity.result.contract.ActivityResultContract
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
import java.io.OutputStream

/**
 *description：写入字符串
 *<br>author：caowugao
 *<br>time：2021/3/8 0008 16:31
 */
class WriteStringHandler(relativeDir : String? = null, imeiType : String, fileName : String, content : String?, append : Boolean, act : AppCompatActivity, contract : ActivityResultContract<Intent, ActivityResult> = ActivityResultContracts.StartActivityForResult(), callback : ((Boolean, Uri?, OutputStream?) -> Unit)? = null) : WriteFileHandler(relativeDir, imeiType, fileName,
    content?.toByteArray() ?: "null".toByteArray(), append, act, contract, callback) {
}